-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor update to the log functions API #23637
Conversation
📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
|
@@ -2,26 +2,26 @@ import Foundation | |||
import CocoaLumberjackSwift | |||
|
|||
@inlinable | |||
public func DDLogVerbose(_ message: @autoclosure () -> Any, file: StaticString = #file, function: StaticString = #function, line: UInt = #line) { | |||
CocoaLumberjackSwift.DDLogVerbose("\(message())", file: file, function: function, line: line) | |||
public func DDLogVerbose(_ message: @autoclosure () -> DDLogMessageFormat, file: StaticString = #file, function: StaticString = #function, line: UInt = #line) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we are redefining these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the purpose is making the logging functions available to all files in the project. Otherwise, we'll need to add import CocoaLumberjackSwift
in every file that logs thing.
Simple and boring changes to make the DDLogXxx functions in the app target match the ones in CocoaLumberjack.
The first comment is the main changes. The second commit is just changing
DDLog(aString)
toDDLog("\(aString)")
to make compiler happy.Regression Notes
Potential unintended areas of impact
What I did to test those areas of impact (or what existing automated tests I relied on)
What automated tests I added (or what prevented me from doing so)
PR submission checklist:
RELEASE-NOTES.txt
if necessary.Testing checklist: